//
//  BKArchiveThirdViewController.m
//  baokaodaxue
//
//  Created by dangyangyang on 15/5/28.
//  Copyright (c) 2015年 宏图教育. All rights reserved.
//

#import "BKArchiveThirdViewController.h"

@interface BKArchiveThirdViewController ()
@property (weak, nonatomic) IBOutlet UILabel *colleageLabel;
@property (weak, nonatomic) IBOutlet UIView *cloudImageView;

@end

@implementation BKArchiveThirdViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    _colleageLabel.text  = [NSString stringWithFormat:@"%@,我来了!",_colleage];
    CABasicAnimation *cloudAnimation = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
    cloudAnimation.toValue = [NSNumber numberWithFloat:-300];
    
    cloudAnimation.duration = 30;
    cloudAnimation.repeatCount = 1000000;
    [_cloudImageView.layer addAnimation:cloudAnimation forKey:@"transform.translation.x"];
}
- (void)viewWillAppear:(BOOL)animated{
    
    [super viewWillAppear:animated];;
    _cloudImageView.hidden = NO;
    
    
    
}

- (void)viewWillDisappear:(BOOL)animated{
    
    
    _cloudImageView.hidden = YES;
    [super viewWillDisappear:animated];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)p_modify:(id)sender {
    
    NSArray *controllerArray = self.navigationController.childViewControllers;
    [self.navigationController popToViewController:controllerArray[1] animated:YES];
    
    
}
- (IBAction)p_back:(id)sender {
       [_cloudImageView removeFromSuperview];
    [self.navigationController popViewControllerAnimated:YES];
    
}
- (IBAction)p_home:(id)sender {
    [[NSNotificationCenter defaultCenter] postNotificationName:@"archiveHome" object:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
